//导入封装好的axios
import request from "./request"

import qs from "qs"
//定义一个请求精品得数据   函数形式就不会出现重复调用
export const JingPinAPI = () => request.get("/products/recommend")
//热门推荐
export const HotAPI = () => request.get("/products/hot")
//短信验证
export const sendMSMAPI = (params) => request.post("/sendSMS", qs.stringify(params))
//手机登录验证
export const PhoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params))
//微信扫码
export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params))
//第一次扫码绑定手机号
export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params))
//获取用户信息
export const UserProfilesAPI = () => request.get("/shop/userProfiles")
//物品详情页
export const GoodsDetails = (id) => request.get(`/products/${id}`)
//购物车
export const CartAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params))
//更多产品，搜索
export const GoodListAPI = (params) => request.get("/products", { params })//params:params
///查看购物车
export const CartsAPI = () => request.get("shop/carts")
//删除购物车
export const DelCartsAPI = (params) => request.delete("/shop/carts", { params })




